#!/usr/bin/env perl

use strict;
use utf8;

my $option = shift @ARGV;

my $number_str = <STDIN>;

chomp($number_str);

my @number_list = split /\s+/, $number_str;

if($option eq 'true'){
    @number_list = sort {$a <=> $b} @number_list;
}elsif($option eq 'false'){
    @number_list = sort {$b <=> $a} @number_list;
}else{
	@number_list = sort {$a <=> $b} @number_list;
}

foreach(@number_list){
	printf "%6s", $_;
}

print "\n";


